package ru.evga.inse.server.gwt.common.client.domain.dict;

import com.google.gwt.text.shared.AbstractRenderer;
import com.google.gwt.text.shared.Renderer;


public class CityRenderer
    extends AbstractRenderer<CityDto>
{
    static private CityRenderer INSTANCE;

    protected CityRenderer()
    {
    }

    /**
     * Returns the instance.
     */
    public static Renderer<CityDto> instance()
    {
        if (INSTANCE == null)
        {
            INSTANCE = new CityRenderer();
        }
        return INSTANCE;
    }

    public String render(CityDto object)
    {
        if (object == null)
        {
            return "";
        }
        return object.getName();
    }
}
